/**============================================================================
 Confidential Information - Limited distribution to authorized persons only.
 This software is protected as an unpublished work under the U.S. Copyright
 Act of 1976.

 Copyright (c) 2011, BluePhoenix Solutions, Inc. All rights reserved.
 ----------------------------------------------------------------------------
 file......: TagsCloud.java
 Author....: Vyacheslav Kovalyov
 Created...: 28.10.11

 Description:

 ============================================================================*/
package ru.monyag.pred.core.tag;

import java.util.*;

/**
 * @author Vyacheslav Kovalyov
 * @version 1.0
 */
public class TagsCloud {

    public TagsCloud() {
        cloud = new HashSet<Tag>();

        //testStaff
        cloud.add(new Tag("AAA111", 1));
        cloud.add(new Tag("bbbbbBBBBB5555", 5));
        cloud.add(new Tag("CCCcc cccCC 10", 10));
        cloud.add(new Tag("DDDDdddddDDDDD 15", 15));
        cloud.add(new Tag("EEE eee EeeeE 20", 20));
        cloud.add(new Tag("FFFfffFFF40", 40));
    }

    public void add(Tag tag) {
        cloud.add(tag);
    }

    public void addAll(Collection<Tag> tags) {
        cloud.addAll(tags);
    }

    public List<Tag> getCloud() {
        List<Tag> tags = new LinkedList<Tag>(cloud);
        Collections.sort(tags);

        return tags;
    }

    private final Set<Tag> cloud;
}
